<h1>
	<a href="<?php echo $this->url(array('action' => 'index', 'controller' => 'index'), null, true) ?>">Projects</a> &raquo;
	<a href="<?php echo $this->url(array('action' => 'project', 'controller' => 'index', 'project' => $this->project->getProjectKey()), null, true) ?>">
		<?php echo $this->escape($this->project->getName()) ?>
	</a>
</h1>

  
<div class="<?php echo $this->build->getStatus() ?>" id="build">
	<h2>
		<a href="<?php echo $this->url(array('action' => 'project', 'controller' => 'index', 'project' => $this->build->getProjectKey(), 'build' => $this->build->getBuildKey())) ?>">
            <?php echo $this->build->getName() ?>
        </a>
	</h2>
	<div>
		<pre><?php echo $this->escape($this->build->getCommitComment()) ?></pre>
	</div>
	<div class="meta">
		by <em><?php echo $this->escape($this->build->getCommitAuthor()) ?></em>
		on <em><?php echo $this->escape($this->build->getCommitTime()) ?></em>
	</div>
</div>
<div id="output">
	<pre><?php 
        if ($this->build->hasPhpUnit()): 
            echo $this->phpUnit($this->escape($this->build->getPhpUnit()));
        endif;?>
		
		<?php
        if ($this->build->hasPhpCs()):
            echo $this->phpCs($this->escape($this->build->getPhpCs()), $this->project->getSrcDir());
        endif; 
    ?></pre>
</div>

<ul id="builds">
    <?php foreach ($this->project->getPrevBuilds($this->build->getBuildKey()) as $build): ?>
		<li class="<?php echo $build->getStatus() ?>">
			<a href="<?php echo $this->url(array('action' => 'project', 'controller' => 'index', 'project' => $build->getProjectKey(), 'build' => $build->getBuildKey())) ?>">
                <?php echo $build->getName() ?>
            </a>
			<div class="meta">
				by <em><?php echo $this->escape($this->build->getCommitAuthor()) ?></em>
				on <em><?php echo $this->escape($this->build->getCommitTime()) ?></em>
			</div>
		</li>
	<?php endforeach; ?>
</ul>
